Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODStorageUnit


SetValue

The SetValue method writes data to the currently focused value, starting at the offset (inclusive).

void SetValue (in ODByteArray value);
value
A byte array whose buffer contains the data to be written.
DISCUSSION
You call this method to write data to the currently focused value. If that value currently is a promise value, the promise is fulfilled before the data is written.

This method writes data to the focused value, starting at the current offset, and overwrites any data at and beyond the offset. If the current offset plus the length of data being written is greater than the current size of the value (as returned by the GetSize method), the size of the value is automatically increased to accommodate the new data.

When you no longer need the structure you pass as the value parameter, you should deallocate that structure and its buffer.

EXCEPTIONS
kODErrUnfocusedStorageUnit
This storage unit is not focused on a value.
kODErrZeroRefCount
This storage unit has a reference count of 0.
SEE ALSO
The ODByteArray type (page 877).
The ODStorageUnit::GetSize method (page 695).
The ODStorageUnit::GetValue method (page 698).
"Manipulating the Data in a Value" on page 276 in OpenDoc Programmer's Guide.
"The Externalize Method" on page 298 in OpenDoc Programmer's Guide.
"Creating Additional Storage Units" on page 301 in OpenDoc Programmer's Guide.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help